package com.xinjiang.electricpower.controller;

import com.ruoyi.common.core.domain.R;
import com.xinjiang.electricpower.domain.vo.OrgConfigVO;
import com.xinjiang.electricpower.service.IOrgManagerInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author feizhao
 * @date 2022/12/7
 * @apiNote 供电所配置信息控制层类
 */

@RestController
@RequestMapping("/xinjiang-power-supply-station/org-config/")
@Api(value = "供电所配置信息控制层类", tags = "供电所配置信息控制层类")
@Validated//有此注解，才会校验游离的参数
@Slf4j
@RequiredArgsConstructor
public class OrgManagerInfoController {


    private final IOrgManagerInfoService orgManagerInfoService;
    /**
     * @return R<List<OrgConfigVO>> 查询供电所配置信息列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "查询供电所列表", notes = "查询供电所列表")
    public R<List<OrgConfigVO>> getXjOrderGeneralProcess() {
        List<OrgConfigVO> list = orgManagerInfoService.getOrgConfigList();
        return R.ok(list, "查询成功");
    }


}
